
<script>
/* eslint-disable */
// import Vue from 'vue';
// import { verifyAccessToken } from '@/api/login'
// import { mapMutations } from 'vuex';
import {is_state} from "@/api/userInfo"
export default {

	 onLaunch() {
		this.handleVerifyAccessToken()
	},
	methods: {
		
	// 检验token是否有效
		async handleVerifyAccessToken () {
			const response=(await is_state()).data;
			if(response.code===1&&!response.data==="1"){
				this.$mRouter.push('pages/public/login')
			}else{
				const username = localStorage.getItem('user');
				this.$store.state.username=username;
			}
		}
	
	}

	
}
</script>
<style lang="scss">
// 导入colorUI
@import '/static/css/colorui/main.css';
@import '/static/css/colorui/icon.css';
@import '/static/css/colorui/animation.css';
// 导入阿里巴巴矢量图标库
/*#ifdef MP*/
@import './static/css/iconfont/iconfont.css';
/*#endif*/
/*#ifndef MP*/
@import url('https://at.alicdn.com/t/font_1681579_dwilkcq6mvg.css');
/*#endif*/
@import './static/css/reset.scss';
@import './static/css/uni.scss';
</style>
